package com.yy.demo.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by YingYou on 2017/9/20.
 */
@Controller
public class HomeController {

    public HomeController() {
        System.out.println();
    }

    @ResponseBody
    @RequestMapping(value = "/statusCode")
    public Object hello(HttpServletResponse response) throws IOException {
        response.sendError(HttpServletResponse.SC_NOT_FOUND);
        return "1234.12341243";
    }

    @RequestMapping(value = "/testWXPay", method = RequestMethod.GET)
    public String wxPay(HttpServletRequest request) {
        return "/wxPay";
    }



}
